﻿<?php
error_reporting(0);
define('IN_QY',true);
session_start();
require("include/common.inc.php");
define('SCRIPT','ad_list');
if(!$_COOKIE['userid']){
      echo "<script type='text/javascript'>location.href='/wap/mlogin.php';</script>";
      exit;
}
//

$sqlifs = "select * from tbl_taospp where ggunit=".$_COOKIE['userid'];
$queryifs=mysql_query($sqlifs);
$rowifs=mysql_fetch_array($queryifs);


//
$sqlu = "select * from tbl_user where id=".$_COOKIE['userid'];
$queryu=mysql_query($sqlu);
$rowu=mysql_fetch_array($queryu);
$jifen = $rowu['jifen'];
$yuee = $rowu['yuee'];
$xyf = $rowu['xyf'];
$vip = $rowu['vip'];
$touxiang = $rowu['username'];
$sqla = "select count(*) as cc from tbl_spp where userid='".$_COOKIE['username']."'";
$querya=mysql_query($sqla);
$rowa=mysql_fetch_array($querya);
$s = $rowa['cc'];
include 'phpqrcode.php';    
$value = 'http://www.goodshare.com.cn/wap/maijiashop.php?togo=1&fid='.$_COOKIE['userid']; //二维码内容   
$errorCorrectionLevel = 'L';//容错级别   
$matrixPointSize = 6;//生成图片大小   
//生成二维码图片   
QRcode::png($value, 'sao/'.$_COOKIE['userid'].'.png', $errorCorrectionLevel, $matrixPointSize, 2);   
$logo = $touxiang;//准备好的logo图片 
  
$QR = 'sao/'.$_COOKIE['userid'].'.png';//已经生成的原始二维码图   

if ($logo !== FALSE) {   
    $QR = imagecreatefromstring(file_get_contents($QR));   
    $logo = imagecreatefromstring(file_get_contents($logo));   
    $QR_width = imagesx($QR);//二维码图片宽度   
    $QR_height = imagesy($QR);//二维码图片高度   
    $logo_width = imagesx($logo);//logo图片宽度   
    $logo_height = imagesy($logo);//logo图片高度   
    $logo_qr_width = $QR_width / 5;   
    $scale = $logo_width/$logo_qr_width;   
    $logo_qr_height = $logo_height/$scale;   
    $from_width = ($QR_width - $logo_qr_width) / 2;   
    //重新组合图片并调整大小   
    imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width,   
    $logo_qr_height, $logo_width, $logo_height);   
}   
//输出图片 
$zpp='sao/'.$_COOKIE['userid'].'.png';  
imagepng($QR, $zpp);   



?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>店铺管理-众晒网</title>
    <link href="/ui/css/Hui.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #header{width:100%; position:absolute; top:0;}
        #footer{width:100%; position:absolute; bottom:0;}
         #main{width:100%; overflow: auto; position:absolute; top:44px;bottom:55px;}
    </style>
</head>
<body onload="createQrcode()">
    <header class="H-header H-theme-background-color-white" id="header">
        <span tapmode="" class="H-icon H-position-relative H-display-inline-block H-float-left H-vertical-middle H-theme-font-color-white H-padding-horizontal-left-5 H-z-index-100" onclick="H.closeWin();"><i class="H-iconfont H-icon-arrow-left H-font-size-18 H-theme-font-color-black  H-vertical-middle"></i></span>
        <div class="H-header-title H-center-all H-font-size-18 H-text-show-row-1 H-theme-font-color-black H-position-absolute H-width-100-percent">
          我的店铺管理
        </div>
    </header>

    <div id="main">
	
    <div class="H-padding-vertical-bottom-5"></div>	
    <div class="H-channel-title H-flexbox-horizontal H-theme-background-color-white H-vertical-middle H-border-vertical-bottom-after">
        <div class="H-channel-line H-theme-background-color8 H-padding-vertical-top-15 H-padding-horizontal-left-3  H-margin-horizontal-left-10"></div>
        <div class="H-channel-text H-theme-font-color8 H-flex-item H-font-size-18 H-theme-font-color-black H-padding-10 H-margin-horizontal-right-10 H-text-show-row-1">店铺管理</div>
    </div>
    <div class="H-padding-vertical-bottom-5"></div>	
<div class="H-n-grid H-border-vertical-top-after H-clear-both  H-overflow-auto">
        <div class="H-clear-both H-width-100-percent H-display-table H-box-sizing-border-box">
		
			<?php if(!$rowifs){ ?>	
		
		
		    <div class="H-channel-title H-flexbox-horizontal H-theme-background-color-white H-vertical-middle H-border-vertical-bottom-after">
        <div class="H-channel-line H-theme-background-color8 H-padding-vertical-top-15 H-padding-horizontal-left-3  H-margin-horizontal-left-10"></div>
        <div class="H-channel-text H-theme-font-color8 H-flex-item H-font-size-18 H-theme-font-color-black H-padding-10 H-margin-horizontal-right-10 H-text-show-row-1">您尚未成为商户，暂无相关信息~  <a href="renzhengbaozhang.php">升级成为商户</a></div>
    </div>
		
		
		
		
			<?php } ?>	
			
					<?php if($rowifs){ ?>	
			
            <div onclick="H.openWin('tuihuotongzhi', 'tuihuotongzhi.php');" class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-3 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10" style="min-height: 130px;">
                <div >
                    <span class="H-icon H-display-block H-horizontal-center">
                    <img  style="width: 33px;height: 33px" src="/ui/image/切换模板.png" alt=""></span>
                    <label class="H-display-block H-font-size-13">退货通知</label>
                </div>
            </div>
            
            <div onclick="H.openWin('tuihuoshou', 'tuihuoshou.php');" class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-3 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10" style="min-height: 130px;">
                <div >
                    <span class="H-icon H-display-block H-horizontal-center"><img  style="width: 33px;height: 33px" src="/ui/image/发放优惠券.png" alt=""></span>
                    <label class="H-display-block H-font-size-13">退货收货</label>
                </div>
            </div>

			
            <div tapmode="" onclick="H.openWin('delivery', 'delivery.php');"  class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-3 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10" style="min-height: 130px;">
                <div >
                    <span class="H-icon H-display-block H-horizontal-center"><img  style="width: 33px;height: 33px" src="/ui/image/快递选择@3x.png" alt=""></span>
                    <label class="H-display-block H-font-size-13">快递选择</label>
                </div>
            </div>	


            <div onclick="H.openWin('yizhifulist', 'yizhifulist.php');" class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-3 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10" style="min-height: 130px;">
                <div >
                    <span class="H-icon H-display-block H-horizontal-center">
                    <img  style="width: 33px;height: 33px" src="/ui/image/已支付订单.png" alt=""></span>
                    <label class="H-display-block H-font-size-13">已支付订单</label>
                </div>
            </div>
			
            <div onclick="H.openWin('myxianzhi', 'myxianzhi.php');" class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-3 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10" style="min-height: 130px;">
                <div >
                    <span class="H-icon H-display-block H-horizontal-center"><img  style="width: 33px;height: 33px" src="/ui/image/fahuo@3x.png" alt=""></span>
                    <label class="H-display-block H-font-size-13">发货管理</label>
                </div>
            </div>			
			
	
	<?php } ?>	
	
   
        </div>
    </div>
    </div>
     
    <div class="single-menu H-background-color-transparent-1 H-flexbox-vertical H-display-none-important H-position-absolute H-vertical-top-0 H-horizontal-left-0 H-horizontal-right-0 H-vertical-bottom-0 H-height-100-percent H-width-100-percent H-z-index-1000000">
        <div class="space H-flex-item"></div>
        <div class="share-menu">
        <div class="H-flexbox-horizontal H-text-align-center H-theme-background-color-white H-padding-vertical-both-10">
    <div class="H-clear-both H-width-100-percent H-padding-horizontal-both-10 H-display-table H-box-sizing-border-box">
	    <div class="H-channel-title H-flexbox-horizontal H-theme-background-color-white H-vertical-middle H-border-vertical-bottom-after">
        <div class="H-channel-line H-theme-background-color-black H-padding-vertical-top-15 H-padding-horizontal-left-3  H-margin-horizontal-left-10"></div>
        <div class="H-channel-text H-theme-font-color-black H-flex-item H-font-size-18 H-theme-font-color-black H-padding-10 H-margin-horizontal-right-10 H-text-show-row-1">长按照片保存</div>
    </div>
  
   <img  style="width: 200px;height: 200px" src="<?=$zpp?>" alt="">
    </div>

            </div>
            <div tapmode="" onclick="H.swiperShare('.single-menu', '.share-menu', 'space');" class="H-theme-background-color-eee H-padding-12 H-font-size-16 H-center-all H-touch-active">我已保存好</div>
        </div>
    </div>
 

   <?include('footer.php');?>
	
    <script src="/ui/script/H.js" type="text/javascript"></script>
	<script src="/ui/js/jquery-2.1.3.min.js"></script>	
</body>
</html>